package com.example.blog.service;

import com.example.blog.mapper.CommentMapper;
import com.example.blog.model.Comment;
import com.example.blog.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Question CommentService
 * @Date 2023/1/24 15:07
 * @Solution
 */
@Service
public class CommentService {
    @Autowired
    CommentMapper commentMapper;
    public List<Comment> getByArtId(int artId) {
        return commentMapper.getByArtId(artId);
    }
    public UserInfo getCommentNameByUid(int uid) {
        return commentMapper.getCommentNameByUid(uid);
    }
    public int add(int uid,int blogId,String content) {
        return commentMapper.add(uid,blogId,content);
    }
}
